﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI.WebControls;
using System.Data;

namespace Guarouba.Classes
{
    public class DDL
    {
        BLL.DDL ddlist = new BLL.DDL();
        DataTable dt = new DataTable();        

        public DropDownList CarregaFormacoesAcademicas(DropDownList ddl)
        {
            dt = ddlist.CarregaFormacoesAcademicas();
            ddl.DataSource = dt;
            ddl.DataTextField = "Formacao";
            ddl.DataValueField = "IDFormacao";
            ddl.DataBind();
            ddl.Items.Add(new ListItem("Selecione", "0"));
            ddl.SelectedValue = "0";            
            return ddl;
        }
    }
}